📜 ⬆️ ⬇️

Its cloud backend in one line of code. Overview BaaS platform "Backendless"

Hi Habr!

The post will be interesting to those who are interested in how to gain time when developing mobile, desktop or browser applications. This information will help your applications to be more functional and go out into the world many times faster.


')
(Caution: under the cut there are many examples of simple code. Fans of “bikes” are not recommended to read. After the popularity of this service grows, the threat of global warming will be eliminated, a massive reduction in depressions from routine tasks when writing the server part.)

Backendless is a backend platform as a service (Backend as a Service), which provides a ready-made cloud server infrastructure for all types of applications. This allows developers, start-ups and large companies to gain time and money by refusing to develop their server, and focus on the functionality of applications, their promotion and users (improving UX). APIs of the platform are available through native KFOR for the following client environments: JavaScript, Android, iOS, Windows Phone, Flex / AIR. All APIs are also available through REST.

Background
The initial mass distribution of personal PCs in the late 90s did not entail the creation of such concepts. And only after twenty years of development of software and hardware infrastructure of the entire global technology cluster (performance of personal and server stations, stable and high-speed communication channels, high waiting, we can not wait for the bandwidth of wireless and mobile networks) led to the flourishing of client-server architecture and popularization of clouds with software model -as-service (soft-for-rent). Powerful and smart mobile devices are already here . Just as in the corporate world “inefficiency” is today the worst sin, so in the future, devices that are not connected to the Internet will serve as an analogue of obscurantism (by the way, people also, the Matrix is ​​indignant). everything is in real time. And almost any connected device to the data network requires a server, isn't it?

Why do such platforms appear?
  • Someone wants to increase the entropy of kindness in the universe and decided to share a good project with the world (open source for the open source)
  • Someone making the previous point wants to earn on the support of a good thing in working condition (commercial open source)
  • Some people got tired of repeating the volumes of repetitive actions and decided to automate all this kitchen (any recurring code automates and depreciates with time)
  • The issue of cost is cheaper to use someone’s ready-made service than to write again (software-as-a-service allows anyone to access the enterprise-level software directly from the start and without capital investment).


The idea is that there are ready-made server services, a set of which together put together the necessary universal cross-platform backend for any project. And it allows you to get rid of the headaches of writing and maintaining your server backend.

Detailed reasons for trying
Avoid having to deal with
  • application server
  • database
  • client-server library
  • writing admin
  • your own design
  • and hosting.


And why, if you can not bathe with hosting, server and team of geeks to further support it for each application or customer.? Everyone loves to create applications, but picking a boring server code and adminit the server part is depressing and dreary.

For what:
BaaS industry potential standard for

For whom:
Developers, startups, digital agencies and content providers, system integrators, application publishers, enterprise enterprises.

Platform functionality:

User Management API (user management) - provides for the application registration and user login, password recovery or account updates cross-platform.

Explanation: the user management service is responsible for 2 main functions - registration of users, as well as their authorization. It is no longer necessary to write checks whether a user exists, maintain sessions, send emails at different events, create access control for users. There are many business rules for this task, which makes it very flexible to customize user management in order to satisfy all needs.

Code examples:
Android
{ Backendless.UserService.login( ”james.bond@mi6.co.uk", ”i.am.bond", asyncCallback ); } 

iOS
 { [backendless.userService login: @”james.bond@mi6.co.uk" password:@”i.am.bond" responder:responder]; } 

Javascript
 { Backendless.UserService.login( ”james.bond@mi6.co.uk", ”i.am.bond", responder ); } 

Data Service API (relational data) - provides storage of user data. Applications can store, update, delete data and carry out search queries.

Explanation: it is possible to work with the service without having any knowledge about the databases. The platform allows you to create your own tables and links between them using the API. On the client, it is enough to create a data structure, when calling the KFK method, the server will create the necessary tables and link them together. Or it can be done using an intuitive user interface via the web console.

Code examples:
Android
 { Person person = new Person( "Bob", 35, "bobby@gmail.com"); Backendless.Persistence.of( Person ).save( person, asyncCallback ); } 

iOS
 { Person *person = [Person new]; person.name = @"Bob"; person.email = @"bobby@gmail.com"; id <IDataStore> dataStore = [backendless.persistenceService of: [Person class]]; [dataStore save:person responder:resp]; } 

Javascript
 { var person = new Person( "Bob", 35, "bobby@gmail.com"); Backendless.Persistence.of( Person ).save( person, responder ); } 

Publish / Subscribe Messaging API (messages) - client applications can communicate in real time by creating Publishers and Subscribers.

Explanation: The message can be any arbitrary (discrete) data. This feature is useful when developing games, chats and applications requiring data broadcasting (data broadcast) or p2p delivery. Sending push notifications and in-app messages to mobile users.

Examples of applications: chat, synchronization of client applications, notifying users about something.

Code examples:
Android
 { Backendless.Messaging .subscribe( ”myChannel", methodCallback, subscriptionCallback ); } 

iOS
 { subscription = [backendless.messagingService subscribe:@"myChannel" subscriptionResponder:responder subscriptionOptions:subscriptionOptions]; } 

Javascript
 { Backendless.Messaging .subscribe( "private_channel", methodResponder, subscriptionResponder ); } 

Push Notifications API (notifications) is a subsection of messages, but with native integration of message delivery to a mobile device as push notifications. Supported for iOS, Android and Windows Phone.

Code examples:
Android
 { Backendless.Messaging .publish( "Hello!", new DeliveryOptions( PushBroadcastMask .ANDROID )); } 

iOS
 { PublishOptions *p = [PublishOptions new]; [p addHeader:@"Name" value:@"Anonymous"]; MessageStatus *res = [backendless.messagingService publish:@"myChannel" message:@"Hello!" publishOptions:p deliveryOptions:[DeliveryOptions deliveryOptionsForNotification:PUSHONLY]]; } 

Javascript
 { Backendless.Messaging .publish( "Hello!", new DeliveryOptions( PushBroadcastMask .ANDROID )); } 

Geolocation API (geolocation) - applications can register geographical coordinates (geo-points) with additional metadata on the server and subsequently carry out search queries for other points on the metadata within a given radius or square.

Possible examples of use in everyday life:

Code examples:
Android
 { Backendless.Geo.getPoints( new BackendlessGeoQuery( "city", ”Kiev" ), asyncCallback ); } 

iOS
 { BackendlessGeoQuery *query = [BackendlessGeoQuery query]; [query metadata:[NSDictionary DictionaryWithObjectsAndKeys: @"Moscow", @"city", nil]]; [backendless.geoService getPoints:query responder:responder]; } 

Javascript
 { Backendless.Geo.getPoints( new BackendlessGeoQuery( "city", ”Dallas" ), responder ); } 

Media Services API (media streams) - a set of services providing “play on demand” and live streaming video and audio. Applications can publish streams from a video camera and microphone for recording or live broadcast. Recorded media (video or audio) and live streams can be played on other clients.

Explanation: Media service allows you to stream video or audio from a client application to a server and play this stream on other devices. You can also play media content uploaded using the service file.

Application examples: video conference, video chat, live video broadcast simultaneously with or to all devices (from phone, tablet, PC camera), video or audio recording directly to the server, live audio broadcast (radio, music)

Code examples:
iOS
 { MediaPublishOptions *options = [MediapublishOptions recordStream:self.preview]; [backendless.mediaService publishStream:@”myVideoChannel" tube:@”Funny Dance" options:options responder:resp]; } 

File Service API (content repository) - supports downloading, sharing and downloading files or data blocks. Files / data can be associated with permanent data records from the relational data service, messages and geo-points.

Explanation: The file management service allows you to upload and access files through the console or client SDK.

Application examples: storing and managing content, streaming video, updating content without having to update the application.

Code examples:
Android
 { Backendless.Files.upload( file, path, asyncCallback ); } 

iOS
 { [backendless.fileService upload:path content:content responder:responder]; } 

Javascript
 { Backendless.Files.upload( fileList, ”myFolder"), responder ); } 

How is this platform better than others ?

Versioning - with shared data / tables between versions - having created an application, you can make an official release, and at this time work on another version of the same application.

Live streaming audio and video: you can connect video chat, live broadcast, music, radio, clips, whatever you want.

Message filtering - message filtering by sub-topics works, and you can also set a filter in the sql form, the so-called selector.

Flex / air clients are supported - available KFD for ActionScript. Using flash, the application will look the same on any device, and without dancing with a tambourine.

Boxed solution - you can get your in-house Backendless out of the box. Large enterprise customers can deploy the platform on their own servers just for themselves.

Flexible pricing and "fat" free plan - freemium includes: API calls unlimited, 2 GB of disk space, 200,000 publish / subscribe messages, 200,000 push notifications. If you have to pay, then only for what will be directly used. You can see and calculate more details here using a convenient calculator. In addition, while the platform is in beta, any limits are a formal convention.

API and webconsole are carefully polished for developers, because maximum attention is paid to simplicity and convenience.

Auto - scalability - the platform is located on the Amazon infrastructure and automatically scales with the occurring loads: by location and by memory used. If the critical limit is exceeded, additional virtual machines are started when processing requests.

How to get started: register or go directly to the developer’s web console through FB authorization, download KFOR with examples, write keys for each KFOR, write a call to the API and that's it: your cloud backend is at your disposal.

Technical support can send questions in Russian. Company offices are located in the States and Ukraine.

Source: https://habr.com/ru/post/180367/


All Articles