Evolution of Backend as a Service: The Second Coming Scorocode

Hello, Habr.
 
 
We break the long silence and announce the release of the second version of Scorocode.
 
This is not even an evolution, but the birth of a new service.
 
 
Year of operation, Docker, Kubernetes, Yandex.Oblako, etc.
 
 
3r318. Warning the question “Why is the Go hub here?”, I answer - all Scorocode services are written in 3r319. Golang
, this language is the main one in the technology stack.
 
 
For details, I ask under the cat.
 
MongoDB , its own database request parser, services that provide the execution of jаvascript code on the server, and all this was a single whole in the cloud. 3r33333.
 
3r33333. The main disadvantages of the platform v1:
 
3r350.  
Resources were all flipped between applications, and it was impossible to get a guaranteed resource, which in our time already looks at least strange.
 
There was no mechanism for launching a full-fledged node WEB server;
 
As it turned out, for most of our clients, NoSQL MongoDB is not needed; instead, everyone asked for relational MySQL /PostgreSQL.
 
The cost of the starting paid tariff was high, about ?000 rubles /month, and there was no understanding what the user was paying for.
 
 
3r33333. At the end of last year, our team, having understood all the achievements and failures, decided to get involved in the development of a new version, fundamentally reworking the architecture. 3r33333.
 
3r371. What's new in v2?
 
3r33333. The logic has not changed. There is an account in which the user who owns the account can create applications. But the structure of the application has changed. It is now independent; it is hosted on dedicated resources (in a public cloud, on a dedicated virtual server). 3r33333.
 
3r33333. Evaluating the work done, we understand that we have gone a long way. We built for the beginning a basic architecture, the bricks of which are services that live in 3r380. docker
-containers, which, in turn, are combined into dependent groups, and they live in the sub-markets, which are controlled by Kubernetes. In general, all of the classics of the genre. 3r33333.
 
3r33333. From ready services are used:
 
3r33300.  
PostgreSQL 3r3306.
 
Redis 3r3306.
 
3r3102. Consul 3r3306.
 
Prometheus

 
 
3r33333. The next step is to write and build your own services. 3r33333.
 
3r3164. Auth
 
3r33333. Authorization service user application method HTTP Authorization (type bearer). 3r33333.
 
3r3164. Broker
 
3r33333. Service for packaging your own services (sorry for the tautology). Today it is presented in the form of a node server, in which you can deploy either your complete application with source code, or the ready-made node assembly (for more details, see the description of scorocode-cli). We develop the service in the direction of the possibility of packaging as ready services from 3r3133. DTR 3r3306. and self-service. The first experiments we do, of course, on the services written in golang. 3r33333.
 
3r3164. DBAPI 3r3165.
 
3r33333. A service that provides RESTful API work with all PostgreSQL database tables.
 
That is, once you have created a table in the database, all CRUD operations are available via the API. 3r33333.
 
3r3164. WebSockets
 
3r33333. When clients connect using the WebSocket protocol, it identifies clients, after which you can send named or broadcast messages from the server API. We will continue to develop the service in the direction of buffering and guaranteed message delivery. 3r33333.
 
3r3164. FS
 
3r33333. Work with folders and files of the application storage. 3r33333.
 
3r3164. PUSH
 
3r33333. Send push notifications. Certificates Android /iOS are attached in your account. 3r33333.
 

Console utility scorocode-cli


 
3r33333. 2 years of user experience with the first version taught us that no matter how beautiful tools were presented on the portal in the user's personal account, after a period of "pampering" the developer wants to return to the familiar environment - to his local computer. Therefore, we could not do without the console utility. 3r33333.
 
3r33333. Today, scorocode-cli (binary sc-cli) provides the developer with the following functions:
 
3r33333. fetch
 
3r33333. Connect to the application in the cloud, authorize, save the configuration in the folder .cli. 3r33333.
 
3r33333. init
 
3r33333. Getting 3r3197. repository 3r3306. and deployment of the base application with the subsequent assembly and saving to the cloud. The basic application is one so far, as the hands reach - we will write a few more, of different types. 3r33333.
 
3r33333. pull
 
3r33333. Synchronization of local project files with the cloud. 3r33333.
 
3r33333. push
 
3r33333. Save local project files to the cloud. 3r33333.
 
3r33333. regdb
 
3r33333. Register a database. 3r33333.
 
3r33333. logs
 
3r33333. Getting logs from the service. 3r33333.
 
3r33333. bridge
 
3r33333. Forwarding local ports to the cloud for all services. For example, after launching the bridge, you can connect any client to the cloudy PostgreSQL as a local one. 3r33333.
 
3r33333. serve
 
3r33333. Local launch of the application. Used for local debugging. 3r33333.
 

Problems


 
3r33333. There were many problems on the road. And there are still a lot of them. They mainly arise at the junction of open source products. Sometimes elementary actions were poured into weekly digging and, as a result, in a pull request to the product repository. It is difficult to cram everything into one article. I hope I will write more about private problems and solutions. 3r33333.
 

Development plans


 
3r33333. First of all we will write services. Many services. But we will not write them in the abstract, but at the request of our customers. We will also develop application templates to connect users with less code. 3r33333.
 

Pro business


 
3r33333. We changed focus from private users to B2B market segment. And we changed the base - now we are in Yandeks.Oblake . More about this will be the articles of our product 3r3305. Korbut
. Because of this, a trial period appeared in the new version of the public cloud - 1 month, after which we would like to understand if the user lost interest in us, or is willing to pay for the service (the cost of the basic configuration of the application is 990 rubles /month). 3r33333.
 

About rates


 
3r33333. Now we have absolutely transparent pricing. The user sees the resources allocated for his IaaS application, for the cost of which we simply charge a percentage. The percentage of floating, depending on the volume consumed. This gave us transparency of pricing and the possibility, after launching the Yandex. Oblaka marketplace, to deploy private clouds to users with pricing in the Yandex.Oblaka personal account. 3r33333.
 
3r33333. And yes, we are cautious. Considering that we give allocated resources for each application, the application pool for the trial period is small, about a hundred. First of all, we sent an invitation to our users from the old version, but we still continue to accept applications for connecting to the trial period on page 3r-3287. scorocode.ru
3r33333.
 

Epilogue


 
3r33333. I am very grateful to our team, which did not lose heart even in the most dead-end situations. By the way, about the team:
 
3r33300.  
3r33333. Anya Korbut
( Korbut ) - Product Manager
 
3r33333. Zhenya Khramtsov
- Architect, go developer
 
3r33333. Levan Kiknadze
- Architect, go developer
 
3r33333. Roma Gayazov
- js /frontend developer
 
3r33333. Tagir Khalilov
- DevOps
 
3r33333. Dasha Golubeva
- Systems Analyst
 
 
3r33333. And, of course, many thanks to the Yandex.Oblaka team for their promptness, support and participation in the problems that arise. 3r33333.
 
3r33333. Thank you for reading to the end. That's all I wanted to say. 3r33333. 3r33350.
3r33347. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () ();
3r33350.
+ 0 -

Add comment