Serialization: ?
Special Data Types:
- Error { int code; string message }
- ApiResponse { T object; Error? error; }
- GeoPoint { double lat, long; }
- Token { string token; }
- FailableAction { bool sucess; }
Serialization: ?
Special Data Types:
| BASE_URL = 'http://our_app/api/' | |
| string getRequestURL(string apiMethod) | |
| { | |
| return BASE_URL + apiMethod; | |
| } | |
| T request<T>(string apiMethod = 'lockbox/list', enum {GET, POST, PUT, ...} httpMethod, Object params[]) | |
| { | |
| string rawData = http.request(self.getRequestURL(apiMethod), httpMethod.toString(), http.buildQuery(params)) |
| https://rubygems.org/gems/devise - authentication | |
| https://rubygems.org/gems/pundit - rbac | |
| https://github.com/ryanb/cancan - rbac | |
| https://rubygems.org/gems/draper - decorator for models | |
| https://rubygems.org/gems/cells - cells | |
| https://rubygems.org/gems/friendly_id - url friendly | |
| https://github.com/rsl/stringex - prettyurl | |
| https://rubygems.org/gems/simple_form - forms | |
| https://rubygems.org/gems/paperclip - files stuff | |
| https://rubygems.org/gems/kaminari - pagination |
| controllers: | |
| desc: Все возможные контроллеры в системе | |
| id: primary key | |
| name: Название контроллера(системное!) | |
| actions: | |
| desc: Все возможные действия в системе(с возможностью использования wildcard символа) | |
| id: primary key | |
| name: Название действия(системное!) | |
| controller_id: foreign key controllers.id - контроллер |
| FROM ruby:2.2.0 | |
| RUN apt-get update -qq && apt-get install -y build-essential libpq-dev | |
| RUN mkdir /myapp | |
| RUN mkdir /tmp/sockets | |
| WORKDIR /myapp | |
| ADD Gemfile /myapp/Gemfile |
| <h2 id="r-tree">R*-tree</h2> | |
| <p><a href="http://www.cs.ucr.edu/~tsotras/cs236/W15/rstar.pdf">Source article about R*-tree</a></p> | |
| <h3 id="what-is-r-tree-actually">What is r-tree actually</h3> | |
| <ul> | |
| <li><script type="math/tex" id="MathJax-Element-1"> B^+ </script> tree like structure, which stores multidimensistrong textonal rectangles</li> |
| Panagea Protocol Client/Server | |
| Протокол будет составлен из минимальных частей, которые будут наращиваться с каждой версией, слоёв. | |
| 0 слой - базовая единица для поддержания подключения между клиентом/сервером. | |
| Подключение через классическое TCP Keep-Alive соединение. | |
| Сериализация будет иметь следующий вид: |
| <?php | |
| $fcount = count(glob('webms/*.webm')); | |
| $watched = []; | |
| if(isset($_COOKIE['watched'])) | |
| { | |
| $watched = json_decode($_COOKIE['watched']); | |
| } |
Serialization: ?
Special Data Types:
| <?php namespace getjump\CarPad\Drom; | |
| // https://api.drom.ru/v1.2/bulls/search?app_id=p8&cid%5B0%5D=23&mainPhotoWidth=300&page=1&pretty=1&revertSort=1&sortBy=enterdate&sticky_region%5B0%5D=25×tamp=1495761446&secret=53e7ac1a6b6b42f0728657a515d6992f09a5a227c5799987941ab30eaecb0513 | |
| class BasicQuery | |
| { | |
| const API_URL = '{protocol}://api.drom.ru/v{version}/{method}'; | |
| private $appId; | |
| private $key; | |
| private $version; |