Build your own Twitter – Part 3 – Azure Timeline Service for Node.js

The last part of this article series described the principles of Twitter-like services based on Azure Storage Tables. This part now describes the structure of a new node module which acts as a timeline service. This service can be used very easily in existing node projects.

To integrate this node module just install the azure-timeline-service via node package manager. This integrates everything that is required automatically:

npm install azure-timeline –save

The module allows to post events to a specific user timeline and the timeline of all followers. The following snip-let illustrates it:

var user = azureTimelineService.createSubject(“<>”, “<>”);

user.postEvent(‘login’, { timestamp: new Date() }).then(function() {
console.log(“DONE”);
});

Every method works asynchronous based on promises. Following another user is as simple as posting an event to a timeline

user.follow(user01).then(function() {
console.log(“DONE”);
})

Following a user means all events this user posts to a timeline will be posted to the followers timeline as well. Last but not least loading a timeline is important. The system returns currently all events from a timeline which is a point of change in the future:

user.loadTimeline().then(function(events) {
console.log(events);
})

All samples are implemented in the sample file of the Azure Timeline project here. Any questions? Feel free to open an issue at GitHub or just stay in touch via this block.

Advertisement

Azure Cost Monitor for Service Providers & Resellers

Are you an Azure reseller or a cloud service provider offering Microsoft Azure services? If so, we start offering you a smarter way to have control about the cloud spendings of your customers or to give your customers a great monitoring tool, seamlessly integrated in your service architecture. The Azure Cost Monitor Reseller Portal is a new way for service providers and resellers to monitor, manage & measure costs in the Microsoft Azure cloud:

csp01

Besides the Enterprise Edition features, the portal will come with these additional features:

  • Customer Management Dashboard
    Manage access to the Azure account or a specific subscription for your customers. Invite new users or assign an existing Azure Active Directory group to provide access rights.
  • Custom SSL & Domain support
    Integrate the service seamlessly in your or the customers service architecture, with a service provider or customer specific domain incl. SSL certificates.
  • Custom pricing & currency support
    Especially when you resell just a simple subscription or if you add some reseller service charges to the pricing, a custom pricing table helps you to manage this complexity.
  • Data access via RESTful API
    A strong integration, e.g. into an existing data warehouse or CRM application is easy and simple with the existing RESTful API.
  • Allows to resell enterprise editions
    Having a reseller edition allows every reseller and cloud service provider to resell Azure Cost Monitor enterprise editions with an individual margin.

Interested? Signup for the early adaptor program and get direct access to the current system.

csp02

We hope this feature makes it simple to maintain your customers with the Azure Cost Monitor and makes it much easier for you to manage and control all costs. Any questions, wishes or ideas? Try our feedback portal or drop a mail to help@azure-costs.com.

ngHelper-Toolbar: Now supports secondary actions & dividers

The $toolbar service is a great helper when it comes to building toolbars in AngularJS applications. The new version 0.0.3 allows you to handle new secondary actions, as shown here in the Azure Cost Monitor application:

secondary-actions

The secondary action can be defined in the addItem function similar to all other options the API supports:

$toolbar.addItem(‘childContract, contract, null, null, true, ‘/report/1234’, null, ‘activeContract’, ‘fa-trash’, function () {                   $scope.removeContract(contract);
});

Making the menu more user-friendly can be achieved by adding dividers in the structure. When using the special menu title “DIVIDER” the system will use this in the menu structure as divider:

$toolbar.addItem(‘user.divider’, ‘DIVIDER’, null, null, true, null, null, ‘user’);

The new navigation infrastructure of the Azure Cost Monitor is using the $toolbar service from the ngHelper-Toolbar project. We hope this feature makes it simple to maintain your toolbars. Any questions, wishes or ideas? Try the issue button on the GitHub page or contact the author via this blog.