Skip to content
This repository was archived by the owner on Jan 22, 2020. It is now read-only.

C++ rendler skeleton #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions cpp/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
# Prefix where Mesos is installed
MESOS_PREFIX = /usr
#MESOS_PREFIX = $(HOME)/usr

CXX = g++
CXXFLAGS = -g -O2
LDFLAGS += -lmesos
CXXFLAGS = -g -g2 -O2 -std=c++11
LDFLAGS = -L$(MESOS_PREFIX)/lib
INCLUDES = -I$(MESOS_PREFIX)/include

LDFLAGS += -lmesos -lprotobuf -lpthread
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) -c -o $@
CXXLINK = $(CXX) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) -o $@
CXXLINK = $(CXX) $(INCLUDES) $(CXXFLAGS) -o $@ $< $(LDFLAGS)

default: all
all: rendler crawl_executor render_executor
all: rendler rendler_skeleton crawl_executor render_executor

HEADERS = rendler_helper.hpp

crawl_executor: crawl_executor.cpp $(HEADERS)
$(CXXLINK) $< -lboost_regex -lcurl
$(CXXLINK) -lboost_regex -lcurl

%: %.cpp $(HEADERS)
$(CXXLINK) $<
$(CXXLINK)

check: crawl
./crawl http://mesosphere.io/team/

clean:
(rm -f core crawl_executor render_executor rendler)
(rm -f core crawl_executor render_executor rendler rendler_skeleton)
8 changes: 4 additions & 4 deletions cpp/README → cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ RENDLER implementation in C++

Dependencies:
============
- libboost_regex.so
- libboost\_regex.so
- libcurl.so
- Makefile assumes all 3rdparty libraries/headers to be available in the
default include path (/usr/include?).
Expand All @@ -18,7 +18,7 @@ Limitations/Features:
====================
- Doesn't store the images to S3, just locally.
- Image files are kept in rendler-work-dir in the same folder as the
render_executor executable.
render\_executor executable.
- Images files are named R<N> where N is a monotonouly increasing integer.
- It wouldn't crawl outside of the given base URL (it will still render those
webpages) to avoid pulling in too much data.
Expand All @@ -28,5 +28,5 @@ Limitations/Features:
Communication between Scheduler and Executors:
=============================================
- Each framework message consists of a vector of strings:
RenderExecuter->Scheduler: { taskId, taskUrl, filepath }
CrawlExecuter->Scheduler: { taskId, taskUrl, <urls>+ }
- RenderExecuter->Scheduler: { taskId, taskUrl, filepath }
- CrawlExecuter->Scheduler: { taskId, taskUrl, \<urls>+ }
Loading